#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2022/2/9 11:09
# @Author  : ldh
from time import sleep
from basic.UIParent import UIParent
from basic.utils.asserts import asserts
from commen.page.agx.AGX_trends_page import trends_page
from commen.page.agx.AGXMyPage import AGXMyPage
from test.cases.agx.AGXLogin import AGXLogin


class AGX_trends(UIParent) :

    @classmethod
    def test_trends(cls) :
        '''动态页校验'''

        # 判断是否登录
        AGXLogin.test_agxLoginByPwd()
        # 打开我的页面
        AGXMyPage.openMyPage()
        sleep(3)
        trends_page.open_trends()
        sleep(3)
        status = trends_page.ifempty_trends()
        if status == True :
            print("动态消息为空！")
        else :
            print("动态消息不为空！")
            source = trends_page.check_trends()
            asserts.equal(source, "爱广西", "动态消息来源校验")
